home *** CD-ROM | disk | FTP | other *** search
/ Mac Easy 2010 May / Mac Life Ubuntu.iso / casper / filesystem.squashfs / usr / lib / python2.6 / email / mime / multipart.pyc (.txt) < prev    next >
Encoding:
Python Compiled Bytecode  |  2009-04-20  |  1.6 KB  |  43 lines

  1. # Source Generated with Decompyle++
  2. # File: in.pyc (Python 2.6)
  3.  
  4. '''Base class for MIME multipart/* type messages.'''
  5. __all__ = [
  6.     'MIMEMultipart']
  7. from email.mime.base import MIMEBase
  8.  
  9. class MIMEMultipart(MIMEBase):
  10.     '''Base class for MIME multipart/* type messages.'''
  11.     
  12.     def __init__(self, _subtype = 'mixed', boundary = None, _subparts = None, **_params):
  13.         """Creates a multipart/* type message.
  14.  
  15.         By default, creates a multipart/mixed message, with proper
  16.         Content-Type and MIME-Version headers.
  17.  
  18.         _subtype is the subtype of the multipart content type, defaulting to
  19.         `mixed'.
  20.  
  21.         boundary is the multipart boundary string.  By default it is
  22.         calculated as needed.
  23.  
  24.         _subparts is a sequence of initial subparts for the payload.  It
  25.         must be an iterable object, such as a list.  You can always
  26.         attach new subparts to the message by using the attach() method.
  27.  
  28.         Additional parameters for the Content-Type header are taken from the
  29.         keyword arguments (or passed into the _params argument).
  30.         """
  31.         MIMEBase.__init__(self, 'multipart', _subtype, **_params)
  32.         self._payload = []
  33.         if _subparts:
  34.             for p in _subparts:
  35.                 self.attach(p)
  36.             
  37.         
  38.         if boundary:
  39.             self.set_boundary(boundary)
  40.         
  41.  
  42.  
  43.